<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl() ;?>/css/thumau.css" media="screen" />
<script src="<?php echo $this->baseUrl() ;?>/scripts/sortertable/jquery.tablesorter.min.js" type="text/javascript"></script>
<script src="<?php echo $this->baseUrl() ;?>/scripts/thudagui.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function() { 
	    $("#danh_sachthu").tablesorter(); 
	});
</script>

<div class ="conten" >

    <table cellpadding="0"  cellspacing="0" class="tableconten" border="0">
        <tr>
            <td class="left_conten" >
            <!-- left  -->
               <div class="module-left">
                      <div class="t_m">
            			<div class="t_r">
            				<h3> 
                                Tạo mới 
            					<a class="toggleicon" href='#'><div onclick="slidetoggle('99')" class='shboxs99 show'><img src="<?php echo $this->baseUrl() ;?>/images/box/down1.png" /></div><div onclick="hslidetoggle('99')" class='hshboxs99 hidden'><img src="<?php echo $this->baseUrl() ;?>/images/box/down2.png" /></div></a>
            				</h3>
            				
            			</div>
            		  </div>
            		  <div id="box99" class="module-content">
            			<ul>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-new_01.png" /><a href="<?php echo $this->baseUrl()?>/thumau/themthumau"   >Thêm thư mẫu  </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-new_01.png" /><a href="<?php echo $this->baseUrl()?>/lienhe/">Thêm liên hệ</a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-new_01.png" /><a href=""> Gửi thư </a></li>
            				
            			</ul>
            		  </div>
            		  <div class="module-bottom">
            			<div class="md-bt-r"><div class="md-bt-l">&nbsp;</div></div>
            		  </div>	                  
               </div>
               
               <!-- thao tac 2 -->
               
               <div class="module-left">
                      <div class="t_m">
            			<div class="t_r">
            				<h3> 
                                Danh Sách
            					<a class="toggleicon" href='#'><div onclick="slidetoggle('98')" class='shboxs98 show'><img src="<?php echo $this->baseUrl() ;?>/images/box/down1.png" /></div><div onclick="hslidetoggle('98')" class='hshboxs98 hidden'><img src="<?php echo $this->baseUrl() ;?>/images/box/down2.png" /></div></a>
            				</h3>
            				
            			</div>
            		  </div>
            		  <div id="box98" class="module-content">
            			<ul>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/thunhap/"   >Danh sách thư nháp </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/thumau/index/"   >Danh sách thư mẫu </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/lienhe/" >Danh Sách liên hệ</a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/thudagui/" > Danh sách thư đã gửi </a></li>
            				
            			</ul>
            		  </div>
            		  <div class="module-bottom">
            			<div class="md-bt-r"><div class="md-bt-l">&nbsp;</div></div>
            		  </div>	                  
               </div>             
               
            <!--  end left--> 
             </td>
            <td class="right_conten" >
            <div class="bao_benphai">
            <!-- right  -->
                <!-- breadcrumd-->
    			<div class="breadcrum" >
    				<ul>
    					<li class="home"><a href="<?php echo $this->baseUrl()?>/thumau/">Thư đã gửi</a></li>
    					<li class="br_item"><span>Danh sách thư đã gửi</span></li>
    				</ul>
    			</div>
		    	<!-- end breadcrumd-->
		    	
		    	<!--  Start Thêm thư   -->
                
                     <form action="<?php echo $this->baseUrl() ?>/thudagui/index/" method="post" >
                     <div class="timkem_list"> 
                            <span class="timthan">
                                 Tìm kiếm : <img  src="<?php echo $this->baseUrl() ?>/images/icon/search_20x20.png" width="17px" height="17px" align="absmiddle"/>
                            	<input type="text" id="tentim" name="keytimkiem" style="width: 250px;"  />
                            	<input type="submit" value="Tìm kiếm" class="save"/>

                            </span>
                           <div class="divthaotac" title="Xóa bộ lọc tìm kiếm"  align="center"> 
	                            <a href="<?php echo $this->baseUrl()?>/thudagui/index">
	                            	 <span id='xoaboloc' class="xoaboloc"></span>
	                            	 Xóa bộ lọc 
	                            </a>
                           </div>
                          <div class="divthaotac" title="Xóa Thư Mẫu" align="center"> 
	                            <a href="#" onclick="xoanhieuthudagui()">
	                            	 <span class="xoatoanbo"></span>
	                            	Sọt rác  
	                            </a>
                          </div>
                            <!-- Ket qua trả về --> 
                            <div class="suggestionsBox">
                               <div class="suggestionList">                            
                               </div> 
                            </div>
                            <!-- Ket qua trả về --> 
                            
                     </div>
                    </form>
                     <!-- End Tìm kiếm  -->                
                
					<div class="box-l-n" style="clear:both;">
						<div class="box-l-n-l">
							<div class="box-l-n-r">
								<div class="box-l-n-m" align="left"> <div class="xoa_botton"><input onclick="xoanhieuthumau()" type="button" value="Xóa" class="delete" />    </div> <h3  >Danh sách thư đã gửi</h3></div>
							</div>
						</div>
					<div class="box-l-n-body">
						<div class="box-l-n-wrr">
						<form id="danhsachthudagui" action="">
		    			<table cellspacing="1" id="danh_sachthu">
							<thead>
							<tr align="center">
								<td width="30" ><input id="check" type="checkbox" onclick="selectReverse('danhsachthudagui','dgid')" style="width: 50px" /></td>
								<th width="40%" ><b>Chủ đề  </b></th>
								<td width="20%" ><b>Files đính kèm  </b></td>
								<td width="20%"><b>Ngày gửi </b></td>
								<td ><b>Thao tác</b></td>
							</tr>
							</thead>
							<tbody>
							<?php foreach ($this->thudagui as $thudagui ){?>
							<tr class="row_<?php echo  $thudagui['id_tg'] ?>">
								<td align="center" ><input type="checkbox" id="dgid_" value="<?php echo  $thudagui['id_tg'] ?>" name="listdg[]"/></td>
								<td width="40%" >
									<input type="hidden" id="company" value="" />
									<a href="#" onclick= "vewthudagui('<?php echo  $thudagui['id_tg'] ?>');"> <b><?php echo $thudagui['tieu_de'] ?></b></a>
								</td>
								<td width="20%" align="center">
									<img src="<?php echo $this->baseUrl()?>/images/icon/attach_2.png" />(<?php echo $thudagui['tong_files']?>)
							    </td>
								<td width="20%" align="center">
									<?php echo $thudagui['ngay_tao']?>
								</td>

								<td align="center">
									<a href="#" onclick= "vewthudagui('<?php echo  $thudagui['id_tg'] ?>');" ><span ><img class="icons" title="Xem thư " src="<?php echo $this->baseUrl() ?>/images/icon/icon-32-read-privatemessage_01.png"></span></a>
								 	<a href="#"> <span onclick="xoathudagui('<?php echo $thudagui['id_tg'] ?>')"><img class="icons" title="Xóa Thư Này" src="<?php echo $this->baseUrl() ?>/images/icon/icon-32-trash_01.png"></span></a>
								</td>
							</tr>
								<?php }?>				
							</tbody>
						</table>
						</div>
						<!--  Phân Trang  -->
				    	<?php 
				    	echo $this->paginationControl($this->paginator,
		                                   'Sliding',
		                                  'pagination.phtml');
				    	 ?>
				    	<!--  end Trang  -->						
					</div>
			   </div>
			
				<input type="hidden" value="<?php echo $this->baseUrl()?>" id="url"/>
				<input type="hidden" value="<?php echo $this->iddangnhap;?>" id="iddn"/>
		    	<!--  End them thư  -->
		    	
		    </div>	
            <!-- right -->
            </td>
            
        </tr>
    
    </table>
</div>

<!--  view thu da gui -->
<style>
.eleCaption{
	padding-top:0px !important;
}
#view_thu_da_gui{
	font-size: 12px !important;
}
</style>
<div id='view_thu_da_gui' title="Xem thư đã gửi" style="display:none">

	<div class="left_conten_form" >
    			<div class="eleRow">
    				<div class="eleCaption"><b>Ngày gửi:</b> </div>
    				<div class="eleBody">
    					<span id='ngaygui'> </span>
    				</div>
    			</div>	
	</div>
	
	<div class="right_conten_form" >
				
    			<div class="eleRow">
    				<div class="eleCaption"><b>Gửi từ tài khoản: </b> </div>
    				<div class="eleBody">
    					<span id='taikhoangui'> <?php echo $this->thonntincauhinh['user_name_email'] ?></span>
    				</div>
    				<span title="In Thư Này  " onclick=" window.print();" class="inthu"> <img src="<?php echo $this->baseUrl() ?>/images/icon/icon-32-print_01.png"/></span>
    			</div>			
	</div>
	<div class="1clolum" >
	    		<div class="eleRow">
    				<div class="title_thu">Tiêu đề :  </div>
    				<div class="eleBody">
    					<span id='tieude'> </span>
    				</div>
    			</div>	
	</div>
	<div class="1clolum" >
	    		<div class="eleRow">
    				<div class="title_thu">Gửi tới :  </div>
    				<div class="datafech">
    					<span id='guitoi'> </span>
    				</div>
    			</div>
    		   <div class="eleRow">
    				<div class="title_thu">Cc :  </div>
    				<div class="datafech">
    					<span id='cc'> </span>
    				</div>
    			</div>	
    		   <div class="eleRow">
    				<div class="title_thu">Bcc :  </div>
    				<div class="datafech">
    					<span id='bcc'> </span>
    				</div>
    			</div>
    		   <div class="eleRow">
    				<div class="title_thu">File đính kèm :  </div>
    				<div class="datafech">
    					<span id='dinhkem'> </span>
    				</div>
    			</div>    			
    				
    		   <div class="eleRow">
    				<div class="title_thu">Nội dung :  </div>
    				<div class="datafech">
    					<span id='noidung'> </span>
    				</div>
    			</div>	    			    			
	</div>

</div>
